{% extends "template/admin_base.html" %}

{% block title %}Avatar - Zxnn.net{% endblock %}

{% block content %}
<h2>Avatar</h2>
<form action="{{ upload_url }}" enctype="multipart/form-data" method="post">
{% if error_message %}
<p class="text-error">{{ error_message }}</p>
{% endif %}
{% if user.avatar %}
<p>
    <h3>Current Avatar:</h3>
    <img src="/public/avatar?nickname={{ user.nickname }}" alt="avatar" class="img-polaroid" />
</p>
<h3>Upload New Avatar:</h3>
{% else %}
<h3>Upload Avatar:</h3>
{% endif %}
<div>
    <input type="file" name="avatar_file"><input type="submit" name="submit" value="Submit" class="btn">
</div>
</form>
{% endblock %}